package com.example.consumer.listeners;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
/*
    消费order主题中
        tag为cancel的消息,对于其他消息不进行消费
 */
//@RocketMQMessageListener(topic = "order",selectorExpression = "cancel",selectorType = SelectorType.TAG,consumerGroup = "order-cancel-group")
public class CancelOrderListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("cancel :" + message);
    }
}
